import type { Config } from 'tailwindcss'
const colors = require('tailwindcss/colors')
function setRemParam(stap:any, start:any, total:any) {
  const param = {}
  for (let i = start; i < total; i = i + stap) {
    param['r' + i.toFixed(1)] = i.toFixed(1) + 'rem'
  }
  return param
}
const remParam = setRemParam(0.1, 0.1, 100)

const config: Config = {
  content: [
    './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
    './src/components/**/*.{js,ts,jsx,tsx,mdx}',
    './src/app/**/*.{js,ts,jsx,tsx,mdx}',
  ],
  theme: {
    colors: {
      ...colors,
      gray: {
        ...colors.gray,
        D2D1D1:'#D2D1D1',
        F4F6FB:'#F4F6FB'
      }, 
      ...{
        '252E51':'#252E51',
        '075bfd':'#075bfd',
        '7122cb':'#7122cb',
        '3b3dec':'#3b3dec',
        'D2D1D1':'#D2D1D1',
        '1F1A1B':'#1F1A1B',
        'FFE5E5':'#FFE5E5',
        'FF4747':'#FF4747',
        'FF7070':'#FF7070',
        'FFC2C2':'#FFC2C2',
        "EF3964":'#EF3964'
      }
    },
    fontFamily: {
      hansans: [' Source Han Sans CN','PingFangSC-Regular', 'PingFang SC'],
      regular: ['PingFangSC-Regular', 'PingFang SC'],
      semibold: ['PingFangSC-Semibold', 'PingFang SC'],
      SFProDisplay: ['SFProDisplay-Semibold', 'SFProDisplay;'],
      'medium-family': ['PingFangSC-Medium', 'PingFang SC'],
    },
    fontSize: {
      ...remParam,
    },
    extend: {
      width: {
        ...remParam,
      },
      padding: {
        ...remParam,
      },
      margin: {
        ...remParam,
      },
      height: {
        ...remParam,
      },
      borderRadius: {
        ...remParam,
      },
      lineHeight: {
        ...remParam,
      }, 
      inset: {
        ...remParam,
      }, 
      maxHeight:{
        ...remParam,
      }, 
      maxWidth:{
        ...remParam,
      },
      minHeight:{
        ...remParam,
      },
      minWidth:{
        ...remParam,
      },
      flex: {
        1: '1 1 0%',
        1.1: '1 1 10%',
        1.125: '1 1 12.5%',
        1.2: '1 1 20%',
        1.3: '1 1 30%',
        1.7: '1 1 70%',
        auto: '1 1 auto',
        initial: '0 1 auto',
        inherit: 'inherit',
        none: 'none',
      },
    },

  },
  plugins: [],
}
export default config
